//vuex
import store from '../store/index.js'
import http from "../utility/request.js";

// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://www.qsxz.demos.cn.vc/' : 'http://api.relaverse.cn/'
// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://test.qsxz.relaverse.cn/' : 'http://api.relaverse.cn/'
const baseUrl = process.env.NODE_ENV === 'development' ? 'https://api.relaverse.cn/' : 'https://api.relaverse.cn/'
// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://8.142.145.167/' : 'http://8.142.145.167/'
// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://test.qsxz.relaverse.cn/' : 'http://test.qsxz.relaverse.cn/'
// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://easy-town.test.canghua.cc/' : 'http://easy-town.test.canghua.cc/'
//  游戏信息
export const user_info = (params) => http.post(`index/member/user_info`, {
	data: {
		acctoken: store.state.collectionToken
	},
	baseUrl
});
//  得到我的藏品列表
export const getMycollection = (params) => http.post(`index/Herb/nftList`, {
	data: {
		acctoken: store.state.collectionToken
	},
	baseUrl
});

// 姜小竹详情
export const getJxzDetail = (params) => http.post(`index/Reserve/nft_massager`, {
	data: {
		acctoken: store.state.collectionToken
	},
	baseUrl
});


// 本草纲目详情
export const getBenDetail = (params) => http.post(`index/Herb/nft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 查询转赠用户
export const inquiryUser = (params) => http.post(`index/Member/userQuery`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 区块链地址  查询转赠用户
export const queryUser = (params) => http.post(`api/v1.nft/queryUser`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 百度区块链  查询转赠用户
export const checkAddress = (params) => http.post(`index/Member/checkAddress`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 超块链 转增时间
export const transferCountdown = (params) => http.post(`api/v1.nft/transferCountdown`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 转让给别人
export const handselSomeone = (params) => http.post(`index/Member/transferNft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 超区块链 转让给别人
export const blockchainTransferNft = (params) => http.post(`api/v2.nft/transferNft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 百度区块链 转让给别人
export const transferNftNew = (params) => http.post(`index/Member/transferNftNew`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 百度区块链 转增时间
export const nftTime = (params) => http.post(`index/Member/nftTime`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 轻松兑换列表
export const convertList = (params) => http.post(`index/mall/mall`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 兑换商品
export const convertApi = (params) => http.post(`index/mall/bay_mall`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 兑换转赠符
export const convertSymbolApi = (params) => http.post(`index/mall/buyTransfer`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 转赠符记录
export const symbolRecord = (params) => http.post(`index/Points/transferlog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 元石记录
export const stoneRecord = (params) => http.post(`index/Points/storelog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 种子记录
export const seedRecord = (params) => http.post(`index/Points/seedlog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 盲盒记录
export const boxRecord = (params) => http.post(`index/Points/boxlog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 加速卡记录
export const quickenlogRecord = (params) => http.post(`index/Points/quickenlog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 打开盲盒 李
export const openBox = (params) => http.post(`index/Herb/openBox`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 查看是否有收到赠送盲盒
export const acceptNft = (params) => http.post(`index/Member/acceptNft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 确认收到赠品
export const confirmAcceptApi = (params) => http.post(`index/Member/addNft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 签到
export const sign = (params) => http.post(`index/Member/sign`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 藏品列表
export const getHasNft = (params) => http.post(`index/user_nft/hasNft`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 藏品列表 鑫
export const getHasNfts = (params) => http.post(`index/User_nft/hasNftNotBrooch`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 胸针藏品列表 鑫
export const hasNftIsBrooch = (params) => http.post(`index/User_nft/hasNftIsBrooch`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});
// 新胸针藏品列表 鑫
export const storage_list = (params) => http.post(`/index/Storage/storage_list`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 胸针藏品列表 鑫
export const broochFilter = (params) => http.post(`index/User_nft/broochFilter`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// nft藏品转增
export const transferNft = (params) => http.post(`/api/v1.nft/transferNft`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 开启盲盒1
export const openBoxX = (params) => http.post(`/index/user_nft/openBox`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 超块链藏品赠送弹窗
export const transferBoxDetails = (params) => http.get(`/index/user_nft/transferBoxDetails`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 超块链领取藏品
export const receiveBox = (params) => http.post(`/index/user_nft/receiveBox`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 盲盒详情
export const nftDetails = (params) => http.get(`/index/user_nft/nftDetails`,{ 
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//用户是否设置安全密码
export const userIfSetPasswordApi = (params) => http.get(`/index/Security/hasCode`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//面容图片上传
export const userFaceImgUploadApi = (params) => http.post(`/index/security/photoCreate`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//其他认证方式(客服二维码)
export const customerServiceApi = (params) => http.get(`/index/security/otherAuthenticate`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//设置密码(type	说明：1：设置 2：修改 3：重置)
export const setPasswordApi = (params) => http.post(`/index/security/setSecretCode`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//校验密码(原密码是否正确)
export const checkPasswordApi = (params) => http.post(`/index/security/checkSecretCode`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//是否可以修改
export const ifCanBeModifyApi = (params) => http.post(`/index/security/isLock`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//校验身份证
export const checkIdCardApi = (params) => http.post(`/index/security/checkIdCard`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//面容校验
export const checkFaceApi = (params) => http.post(`/index/security/checkMatch`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//空投藏品弹窗
export const nftPopUps = (params) => http.post(`/api/v1.pop_ups/nftPopUps`, {
	data: {
		acctoken: store.state.collectionToken
	},
	baseUrl
});



// 藏品活动列表
export const activityList = (data) => http.post(`/cmsprovider/v2/collection/activity/list`, {
	data
});

// 胸针藏品
export const medalNft = (data) => http.post(`/index/medal/medalNft`, {
	data: {
		acctoken: store.state.collectionToken
	},
	baseUrl
});

// 藏品banner
export const bannerList = (data) => http.get(`/cmsprovider/v2/collection/banner/list`);

// 用户拥有区块链地址
export const getUserAddress = (data) => http.get(`/cmsprovider/v1/user/blockchain/address`);

// 任务活动列表
export const taskList = (data) => http.get(`/cmsprovider/v1/smalltown/task/list`);

// 别人的藏品列表
export const otherCollection = (data) => http.get(`/cmsprovider/v1/user/collection/list`, {
	data
});

// 兑换藏品
export const convertCollection = (params) => http.post(`index/redemption_Code/redemptionCode`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 藏品记录
export const collectionRecord = (params) => http.post(`index/Points/nft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 转赠详情
export const handselDetail = (params) => http.post(`index/Points/nft_details`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 转赠详情
export const saveCidApi = (params) => http.post(`index/member/bind_cid`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 签到日历
export const signInCalendar = (params) => http.post(`/index/Sigin/calendar`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 签到
export const signInApi = (params) => http.post(`/index/Sigin/sigIn`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

// 重构 我的藏品列表
export const storageNftList = (params) => http.post(`/index/Storage/nft_list`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//是否弹出动画（初始简版）
// export const check_and_revise = (params) => http.post(`/index/special_effects/check_and_revise`, {
// 	data: {
// 		acctoken: store.state.collectionToken,
// 		...params
// 	},
// 	baseUrl
// });

//查看用户已观看引导
export const special_effects_check = (params) => http.post(`/index/Special_effects/check`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//引到后写入用户引导数据
export const special_effects_revise = (params) => http.post(`/index/Special_effects/revise`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//搜索好友
export const fuzzy_search = (params) => http.post(`/index/Member/fuzzy_search`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//加速卡相关配置
export const quicken_configure = (params) => http.post(`/api/v1.Nft/quicken_configure`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//用户使用加速卡
export const quicken_nft = (params) => http.post(`/api/v1.Nft/quicken_nft`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//空投弹窗
export const airdrop_tips = (params) => http.post(`/index/Points/airdrop_tips`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//加速卡详情
export const quickenDetail = (params) => http.post(`/index/Points/quicken`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//操控页续期弹框文案
export const pop_up = (params) => http.post(`api/v1.Props/pop_up`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//游戏种子详情接口

export const gameSeed = (params) => http.post(`/index/Points/game_seed`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//游戏种子详情加减接口
export const gameSeedLog = (params) => http.post(`/index/Points/game_seed_log`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//游戏元气详情加减接口
export const scorelog = (params) => http.post(`/index/Points/scorelog`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//元气碎片查询
export const score_fragment = (params) => http.get(`/index/score_fragment/index`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//元气碎片合成
export const compose = (params) => http.post(`/index/score_fragment/compose`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});

//获取用户全部地址
export const getAll = (params) => http.post(`/index/shop_addres/get_all`, {
	data: {
		acctoken: store.state.collectionToken,
		...params
	},
	baseUrl
});
//游戏元气详情加减接口
// export const scorelog = (params) => http.post(`/index/Points/scorelog`, {
// 	data: {
// 		acctoken: store.state.collectionToken,
// 		...params
// 	},
// 	baseUrl
// });